import request from '@/utils/request'

// 查询座位订单列表
export function listSeatorder(query) {
  return request({
    url: '/system/seatorder/list',
    method: 'get',
    params: query
  })
}

// 查询座位订单详细
export function getSeatorder(id) {
  return request({
    url: '/system/seatorder/' + id,
    method: 'get'
  })
}
// 查询座位订单详细
export function getSeatorderByUserId(userId) {
  return request({
    url: '/system/seatorder/list/' + userId,
    method: 'get'
  })
}

// 新增座位订单
export function addSeatorder(data) {
  return request({
    url: '/system/seatorder',
    method: 'post',
    data: data
  })
}

// 修改座位订单
export function updateSeatorder(data) {
  return request({
    url: '/system/seatorder',
    method: 'put',
    data: data
  })
}
export function updateSeatorderStatusById(id) {
  return request({
    url: '/system/seatorder/status/'+id,
    method: 'put'
  })
}

// 删除座位订单
export function delSeatorder(id) {
  return request({
    url: '/system/seatorder/' + id,
    method: 'delete'
  })
}
